package net.plentz.tagger.data;

import net.plentz.tagger.Util;

import org.eclipse.swt.graphics.ImageData;

public class ArtworkData {

	private ImageData imageData;
	private String md5;

	public ArtworkData(ImageData imageData) {
		this.setImageData(imageData);
	}

	public ImageData getImageData() {
		return this.imageData;
	}

	public void setImageData(ImageData imageData) {
		this.imageData = imageData;
		try {
			this.md5 = Util.getMD5(this.imageData.data);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	public String getMD5() {
		return this.md5;
	}

}
